package Day07_30;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Calculation_Method_Time {
    public static void main(String[] args) {
        long nowTime = System.currentTimeMillis();//nowTime---->毫秒数
        For();
        long futureTime = System.currentTimeMillis();

        System.out.println( " For方法执行所耗时间：" + (futureTime - nowTime) +"ms");

        Date a = new Date(1);
        SimpleDateFormat b = new SimpleDateFormat("yyyy-MM-ddd HH:mm:ss SSS");
        System.out.println(b.format( a ));
    }
    public static void  For(){
        int j=0;
        for (int i = 0; i < 1000000000; i++) {
           // System.out.println( i );
            j += i;
        }
    }
}
